<?php
$this->breadcrumbs = array(
    'Items' => array('index'),
    $model->name,
);

$this->menu = array(
    array('label' => 'List Item', 'url' => array('index')),
    array('label' => 'Create Item', 'url' => array('create')),
    array('label' => 'Update Item', 'url' => array('update', 'id' => $model->id)),
    array('label' => 'Delete Item', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')),
);
?>

<h1>View Item #<?php echo $model->id; ?></h1>

<?php
$this->widget('bootstrap.widgets.TbDetailView', array(
    'data' => $model,
    'attributes' => array(
        'name',
        array(
            'name' => 'avatar',
            'header' => 'Ảnh',
            'type' => 'raw',
            'value' => CHtml::image(Yii::app()->request->baseUrl . '/upload/admin/items/' . $model->avatar, "", array("style" => "width:100px;"))
        ),
        array(
            'name' => 'status',
            'value' => $model->status == 1 ? "Hiển thị" : "Ẩn"
        ),
        array(
            'name' => 'user_created',
            'value' => $model->userCreated->fullname
        ),
        'created_at',
        'user_updated',
        'updated_at',
    ),
));
?>
